import java.security.PublicKey;
import java.util.List;

public class MyLinkedList implements IList {
   public  static class ListNode {
        public int val;
        public ListNode pre;
        public ListNode next;
        public ListNode(int val){
            this.val = val;
        }

    }
    public ListNode head;
    public ListNode last;
    @Override
    public void addFirst(int data) {

    }

    @Override
    public void addLast(int data) {

    }

    @Override
    public void addIndex(int index, int data) {

    }

    @Override
    public int size() {
        ListNode cur = head;
        int cunt = 0;
        while(cur != null) {
            cunt++;
            cur = cur.next;
        }
        return cunt;
    }

    @Override
    public void clear() {

    }

    @Override
    public boolean contains(int key) {
        return false;
    }

    @Override
    public void remove(int key) {

    }

    @Override
    public void removeAllKey(int key) {

    }

    @Override
    public void display() {
        ListNode cur = head;
        while(cur != null) {
            System.out.println(cur.next +" ");
            cur = cur.next;
        }
    }
}
